<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CretateStatPlayersTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('stat_players', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('server_id')->comment('游戏服id');
            $table->integer('online_number')->comment('在线人数');
            $table->integer('hour')->comment('小时值');
            $table->date('date_time')->comment('日期');
            $table->timestamps();
            $table->index('date_time');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('stat_players');
    }
}
